home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / win / vb / sqlqry.exe / QUERY.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1992-01-02  |  10.2 KB  |  291 lines

  1. QUERY
  2. Query SQL Server
  3. Form1
  4. Label1
  5. Query:
  6. QUERY_FIELD
  7. NEW_QUERY_BUTTON
  8. &New Query
  9. SEND_QUERY_BUTTON
  10. &Send Query
  11. Label2
  12. Results:
  13. Results_List
  14. Hello
  15. Courier
  16. ;    Menu_File
  17. &File
  18. Menu_File_Open
  19. &Open
  20. Menu_File_Save
  21. &Save
  22. Menu_File_SaveAs
  23. Save_&As
  24. Menu_File_Exit
  25. &Exit
  26. A    Menu_Edit
  27. Menu_Edit_Cut
  28. Menu_Edit_Copy
  29. Menu_Edit_Paste
  30. Paste
  31. Menu_Print
  32. &Print
  33. Menu_Print_Query
  34. &Query
  35. Menu_Print_Results
  36. &Results
  37. Form_Click
  38. VBSQL1
  39. VBSQL1_Error
  40. SqlConn
  41. Severity
  42. ErrorNum
  43. OSError
  44. ErrorStr
  45. OSErrorStr
  46. RetCode
  47. ErrStr
  48. VBSQL1_Message3
  49. Message@
  50. State}
  51. MsgStr
  52.     SQLErrors/
  53. SQLErrors_Errorb
  54. SQLErrors_Message
  55. Command1
  56. Connect"
  57. Connect_Click
  58. Serverw
  59. SqlOpenConnection\
  60. SqlInitc
  61. SqlCmd
  62. SqlExec
  63. SqlResults
  64. SqlNextRowF
  65. NOMOREROWSW
  66. numcolu
  67. SqlNumColsB
  68. DataV
  69. SqlData
  70. SqlClose
  71. SqlWinExitK
  72. Form1x
  73. Continue
  74. DataStr
  75. CLOSE_BUTTON_Click
  76.     QUERYFORM*
  77. QUERY_FIELD_Change
  78. SEND_QUERY_BUTTON_Click
  79. Query_Field
  80. rowdata
  81. RESULT_FIELD
  82. RESULTS_FIELD@
  83. ClearFields
  84. Form_GotFocus
  85. NEW_QUERY_BUTTON_Click^
  86.     Form_Load
  87. RESULTS_FIELD_Change
  88. coldata5
  89. ColLengths
  90.     SqlColLen
  91. ColnameO
  92. SqlColName
  93.     ActualLen
  94. colline
  95. TABKEY
  96. DETAIL_FIELD
  97. rowlen
  98.     SqlCancel
  99. Results
  100. tmplen 
  101. ColValue
  102. nextline
  103.     underline
  104. rowcntj
  105. tmplenx
  106. templenh
  107. RESULTS_LIST_Clicke
  108. Result_list
  109. Results_List4
  110.     ListCount
  111. Check
  112. GotFocus
  113. FocusC
  114. ResultP
  115. REGROW:
  116. NOMORERESULTS
  117. Process_SQL_queryt
  118. SubProcess_SQL_query-
  119. WhileResult
  120. RowProcess
  121.     owProcess
  122. value
  123. SqlAData]
  124.     Calculate
  125. length
  126. ColPositions
  127. colwidth
  128. index
  129. altcolF
  130. SqlAltColId
  131. db_nameF
  132. dbidR
  133.     sysusagesS
  134. order7
  135. computer
  136. colnum
  137. altop
  138. SqlAltOp}
  139. numalts
  140. SqlNumAltsL
  141. number
  142. columnsp
  143.     altstring}
  144.     SqlPrType
  145. altvalueT
  146. psychology
  147.     SqlDatLen
  148. SqlCount
  149. coluline$
  150. SqlGetAltColInfo*
  151. AltColDetail
  152. Status
  153. AltColumnDataY
  154. colid
  155.     aggopname
  156. ColInfod
  157. SqlGetColumnInfo
  158. ColDetails
  159. Collen]
  160.     ColDetailq
  161. ColumnData
  162. numcompy
  163. SqlNumCompute1
  164. numorder
  165. SqlNumOrders
  166. ResultProcess
  167. ordercol
  168. SqlOrderColK
  169. RemColNamex
  170. even^
  171. column?
  172. headings
  173. displays
  174. program
  175. anyway
  176. would
  177. Form_KeyDown
  178. KeyCode
  179. Shift
  180. Form_DragOver
  181. Source
  182. RetVal,    
  183. Menu_Edit_Cut_Click
  184. Work[
  185. Text1
  186. WstartD    
  187. SelStart
  188. Wlength
  189.     SelLength
  190.     ClipboardO    
  191. Menu_Edit_Copy_Click(
  192. SelTexth    
  193. Menu_Edit_Paste_Click
  194. Menu_File_Open_Click
  195. GetFile
  196. FullFilePath
  197. FileSelected
  198. Menu_File_Save_Click
  199. Menu_Edir_SaveAs_Clickd
  200. SaveFile
  201. Load    
  202. Menu_File_Exit_Click#
  203. Menu_Edit_SaveAs_Click
  204. Menu_File_SaveAs_Click
  205. Query
  206. SqlSendCmd
  207. DatabaseName
  208.     TableListO
  209. ColLenghts
  210. Menu_Print_Query_Click
  211. PrTxt@
  212. Menu_Print_Results_Click
  213. Results_List_Change
  214. Space200
  215. Space50
  216.     TotalLine
  217. TotalULine
  218. EndCompute
  219. FALSE
  220. ComputeLine
  221. altstr}
  222. alttype
  223. Total
  224. PosStr
  225. Totals
  226. Float
  227. TotalsOK
  228.     TotalsCol 
  229. SEND_QUERY_BUTTON_Click
  230. ClearFields
  231. NEW_QUERY_BUTTON_Click
  232. Form_Load
  233.    OPEN DEVICE TO PRINT DIRECTLY TO LASERJET PRINTER
  234. \dev\lpt1"
  235.  Call routine to clear the fieldsy
  236. Process_SQL_query
  237.  Define array for column lengths and column positions
  238.  Define structures for getting a compute column's information and gettingL
  239.  a regular column's informationa
  240.                                                             
  241. There is no query in the Query field
  242. SqlCmd failed, SqlConn = "
  243. , Qry$ = "
  244. SqlExec failed, SqlConn = 
  245.  Get each set of results
  246.  Get the number of compute columns, order by columns, and select columns
  247.  Get the exact position of each column (for lining up compute columns)
  248.    Get the column name and length for each column 
  249.  CHECK IF HEADER LARGER THAN COLUMN WIDTHc
  250.         If ActualLen& + 2 > ColLengths(X%) Then
  251. + TABKEY$
  252. + TABKEY$
  253. + TABKEY$
  254. + TABKEY$
  255.  MsgBox Colname$ + " = " + Str$(ColLengths(X%)) + " at " + Str$(ColPositions(X%))V
  256.  PRINT OUT THE COLUMN HEADERSr
  257.  Get each row of data, and process according to type of rowS
  258.  Process a COMPUTE Row
  259.  Process a REGULAR row.
  260. was SqlDatLen(SqlConn, X%)
  261. + TABKEY$
  262. + TABKEY$
  263. The output is too long to fit in the text box.  It has been truncated"
  264.  PRINT TOTALS
  265.    Output the number of rows affected by the query.t
  266.    Output the sort order (if applicable)
  267.  rows affected)"
  268. Sort Order: 
  269. Menu_Edit_Cut_Click
  270. Get the working parameters
  271. Copy the cut text to the clipboard
  272. Cut the text out
  273. Position edit cursor
  274. Menu_Edit_Copy_Click
  275. Menu_Edit_Paste_Click
  276. Get the working parameters
  277. Cut the text out, if any, and insert clipboard textV
  278. Position edit cursor
  279. Menu_File_Open_Click
  280.   MsgBox FullFilePath + ", " + Str$(FileSelected))
  281. Menu_File_Exit_Click
  282. (s0p16.67h8.5v0s0b0T
  283. Menu_File_Save_Click
  284. Menu_File_SaveAs_Click
  285.    Msgbox FullFilePath
  286. Menu_Print_Query_Click
  287. (s0p16.67h8.5v0s0b0T
  288.   MsgBox PrTxt$
  289. Menu_Print_Results_Click
  290. (s0p16.67h8.5v0s0b0T
  291.